package pl.edu.pw.MidEmu.Sensing.Processing;

/**
 * Class responsible for keeping settings of sensor's loop
 * @author Mateusz Starodab
 *
 */
public class LoopProcessing
{
	/**
	 * Enumerator containing possible loop specifications
	 * @author Mateusz Starodab
	 *
	 */
	public enum LoopSpecification
	{
		/**
		 * Loop will be endless
		 */
		Endless,
		/**
		 * Loop wil have limited number of iterations
		 */
		Incremental
	}

	/**
	 * Enumerator containing possible loop time specifications
	 * @author Mateusz Starodab
	 *
	 */
	public enum TimeSpecification
	{
		/**
		 * loop will process without interruptions
		 */
		Contionus,
		/**
		 * Loop will have intervals beetween iterations
		 */
		Interval
	}

	private int intervalTime;

	private int iterationCount;

	private LoopSpecification loopSpecification;

	private TimeSpecification timeSpecification;


	/**
	 * Gets loop interval time between iterations
	 * @return interval time
	 */
	public int getIntervalTime()
	{
		return intervalTime;
	}

	/**
	 * Gets loop iterations count
	 * @return iterations count
	 */
	public int getIterationCount()
	{
		return iterationCount;
	}

	/**
	 * Gets loop specifications
	 * @return loop specifications
	 */
	public LoopSpecification getLoopSpecification()
	{
		return loopSpecification;
	}

	/**
	 * Gets time specifications
	 * @return time specifications
	 */
	public TimeSpecification getTimeSpecification()
	{
		return timeSpecification;
	}

	/**
	 * Sets loop interval time
	 * @param intervalTime Iterval time to be set
	 */
	public void setIntervalTime(int intervalTime)
	{
		this.intervalTime = intervalTime;
	}

	/**
	 * Sets loop iterations count
	 * @param iterationCount Iterations count to be set
	 */
	public void setIterationCount(int iterationCount)
	{
		this.iterationCount = iterationCount;
	}

	/**
	 * Sets loop specification
	 * @param loopSpecification Loop specifications to be set 
	 */
	public void setLoopSpecification(LoopSpecification loopSpecification)
	{
		this.loopSpecification = loopSpecification;
	}

	/**
	 * Sets time specification
	 * @param timeSpecification Time specification to be set
	 */
	public void setTimeSpecification(TimeSpecification timeSpecification)
	{
		this.timeSpecification = timeSpecification;
	}
}
